import { Context } from 'vk-io';

export interface CommandOptions<C> {
  triggers: {
    regex: RegExp,
  }
  /**
   * A handler that calls when commander founded command
   * 
   * @param args Object with parsed named regex groups
   */
  handler: (
    context: C,
    args: Record<string, string | number>
  ) => any | Promise<any>,

  guards?: any,
}

export class Command<C extends Context> {
  constructor(public options: CommandOptions<C>) {}
}
